package message

type CommonMessageStruct struct {
	TableName string `json:"table_name"`
	Id        int    `json:"id"`
	Status    string `json:"status"`
}

// adzone

type AdzoneMessageStruct struct {
	TableName string              `json:"table_name"`
	Id        int                 `json:"id"`
	Status    string              `json:"status"`
	Content   AdzoneContentStruct `json:"content"`
}

type AdzoneContentStruct struct {
	MediaId           int      `json:"media_id"`
	PublisherId       int      `json:"publisher_id"`
	DefaultMaterialId int      `json:"default_material_id"`
	Bidfloor          int      `json:"bidfloor"`
	RollType          int      `json:"roll_type"`
	OnlineStatus      int      `json:"online_status"`
	Width             int      `json:"width"`
	Height            int      `json:"height"`
	MaxDuration       int      `json:"max_duration"`
	MinDuration       int      `json:"min_duration"`
	Exposure          []string `json:"exposure"`
	Click             []string `json:"click"`
	AdModelId         []int    `json:"ad_model_id"`
}

// adzone_blacklist

type AdzoneBlacklistMessageStruct struct {
	TableName string                       `json:"table_name"`
	Id        int                          `json:"id"`
	Status    string                       `json:"status"`
	Content   AdzoneBlacklistContentStruct `json:"content"`
}

type AdzoneBlacklistContentStruct struct {
	Array []int `json:"array"`
}

// adzone_material_type

type AdzoneMaterialTypeMessageStruct struct {
	TableName string                          `json:"table_name"`
	Id        int                             `json:"id"`
	Status    string                          `json:"status"`
	Content   AdzoneMaterialTypeContentStruct `json:"content"`
}

type AdzoneMaterialTypeContentStruct struct {
	Array []string `json:"array"`
}

// dsp

type DspMessageStruct struct {
	TableName string           `json:"table_name"`
	Id        int              `json:"id"`
	Status    string           `json:"status"`
	Content   DspContentStruct `json:"content"`
}

type DspContentStruct struct {
	BidUrl             string `json:"bid_url"`
	WinNoticeUrl       string `json:"win_notice_url"`
	WinNoticeEncrypted bool   `json:"win_notice_encrypted"`
	Token              string `json:"token"`
	Qps                int    `json:"qps"`
	UseCookieMapping   bool   `json:"use_cookie_mapping"`
	CookieMappingUrl   string `json:"cookie_mapping_url"`
	ParticipationBid   bool   `json:"participation_bid"`
	TransformType      int    `json:"transform_type"`
	UseCdn             int    `json:"use_cdn"`
	AuctionType        int    `json:"auction_type"`
	MultiDeal          bool   `json:"multi_deal"`
	IconUrl            string `json:"icon_url"`
	ShowAd             int    `json:"show_ad"`
}

// material

type MaterialMessageStruct struct {
	TableName string                `json:"table_name"`
	Id        int                   `json:"id"`
	Status    string                `json:"status"`
	Content   MaterialContentStruct `json:"content"`
}

type MaterialContentStruct struct {
	Url               string   `json:"url"`
	CdnUrl            string   `json:"cdn_url"`
	PcGaoQingUrl      string   `json:"pc_gaoqing_url"`
	Tv1080Url         string   `json:"tv_1080_url"`
	MobileLiuchangUrl string   `json:"mobile_liuchang_url"`
	AdvertiserId      int      `json:"advertiser_id"`
	RollType          []int    `json:"roll_type"`
	IsEbusinessGame   bool     `json:"is_ebusiness_game"`
	IndustryId        int      `json:"industry_id"`
	IsDefault         bool     `json:"is_default"`
	Bidfloor          int      `json:"bidfloor"`
	DspId             int      `json:"dsp_id"`
	Width             int      `json:"width"`
	Height            int      `json:"height"`
	Type              string   `json:"type"`
	Duration          int      `json:"duration"`
	Cm                []string `json:"cm"`
	Pm                []string `json:"pm"`
	LandingPage       []string `json:"landingpage"`
}

// media

type MediaMessageStruct struct {
	TableName string             `json:"table_name"`
	Id        int                `json:"id"`
	Status    string             `json:"status"`
	Content   MediaContentStruct `json:"content"`
}

type MediaContentStruct struct {
	Name         string `json:"name"`
	Url          string `json:"url"`
	UseUrlVerify bool   `json:"use_url_verify"`
}

// traffic_targeting

type TrafficTargetingMessageStruct struct {
	TableName string                        `json:"table_name"`
	Id        int                           `json:"id"`
	Status    string                        `json:"status"`
	Content   TrafficTargetingContentStruct `json:"content"`
}

type TrafficTargetingContentStruct struct {
	AdzoneIdList    []int               `json:"adzone_id_list"`
	TargetingUnits  []TargetUnitisArray `json:"targeting_units"`
	BidType         int                 `json:"bid_type"`
	BidPrice        int                 `json:"bid_price"`
	ImpressionLimit int                 `json:"impression_limit"`
	MaterialAudit   int                 `json:"material_audit"`
	VisiableMonitor int                 `json:"visiable_monitor"`
	StartDate       int                 `json:"start_date"`
	EndDate         int                 `json:"end_date"`
	DspId           int                 `json:"dsp_id"`
}

type TargetUnitisArray struct {
	TargetingType int  `json:"targeting_type"`
	ValueId       int  `json:"value_id"`
	IsPositive    bool `json:"is_positive"`
}

// advertiser

type AdvertiserMessageStruct struct {
	TableName string                  `json:"table_name"`
	Id        int                     `json:"id"`
	Status    string                  `json:"status"`
	Content   AdvertiserContentStruct `json:"content"`
}

type AdvertiserContentStruct struct {
	CustomerType []int `json:"customer_type"`
	AddBlackList bool  `json:"add_black_list"`
}

// price_policy

type PricePolicyMessageStruct struct {
	TableName string                   `json:"table_name"`
	Id        int                      `json:"id"`
	Status    string                   `json:"status"`
	Content   PricePolicyContentStruct `json:"content"`
}

type PricePolicyContentStruct struct {
	Price          int                 `json:"price"`
	CustomerType   int                 `json:"customer_type"`
	AdzoneIdList   []int               `json:"adzone_id_list"`
	TargetingUnits []TargetUnitisArray `json:"targeting_units"`
}
